import { useLocation } from 'react-router-dom';
/* 
    1、必须以useXxxx开头
    2、不能在hooks函数中使用
 */
export default function usePathKey() {
    const location = useLocation()
    // const key: RouterKeys = location.pathname.split('/')[1] as RouterKeys
    return location.pathname.slice(1)
}
